func maxMin(k int32, arr []int32) int32 {
// Write your code here
sort.Slice(arr, func(i,j int) bool {
return arr[i] < arr[j]
})
min:=int32(1000000000)
n:=len(arr)-int(k)
a:=int(k)-1
begin:=0
for begin<=n{
if arr[begin+a]-arr[begin]<min{
min=arr[begin+a]-arr[begin]
}
begin++
}
return min
}